<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vue文本插值与指令</title>
</head>

<style>
    .red{
        color : red;
    }
    .blue{
        color: blue;
    }
</style>
<body>
<div id="app">
<!--    <div v-once>-->
    <div v-bind:class="color">
        {{message}}
    </div>
    <br>
    <div v-html="v_html"></div>
    <div>{{number + 1}}</div>
    <div>{{boolean ? "真": "假"}}</div>
    <div>{{message.split('vue')}}</div>
    <div v-if="boolean">根据boolean是否为true决定是否显示</div>
</div>

<script src="../js/vue.js"></script>
<script>

    const message = {
        message: '该文本不能用vue调试器修改',
        v_html :　'<h1>标题文字</h1>',
        color: 'red',
        number: 0,
        boolean: true,
    };

    //数据冻结, 禁止调试
    //Object.freeze(message)

    const demo = new Vue({
        el: '#app',
        data: message,
        methods: {

        }
    });
</script>
</body>
</html>